package org.price.sql.repo.document.model;

import org.price.sql.repo.documents.config.Property;

public class PropertyInfo<T> {

    private Property docProperty;

    private boolean dirty;

    private T value;

    private String normalizedName;

    public PropertyInfo() {

    }

    public Property getDocProperty() {
        return docProperty;
    }

    public void setDocProperty(Property docProperty) {
        this.docProperty = docProperty;
    }

    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }

    public boolean isDirty() {
        return dirty;
    }

    public void setValue(T value) {
        if (this.value != value) {
            setDirty(true);
        }

        this.value = value;
    }

    public T getValue() {
        return value;
    }

    public void setNormalizedName(String normalizedName) {
        this.normalizedName = normalizedName;
    }

    public String getNormalizedName() {
        return normalizedName;
    }
}
